﻿package com.sff.webservice.data {
	
	public class WSArgument {
		
		private var _name			:String;
		private var _type			:String;		
		private var _isSimpleType	:Boolean = false;
		
		public function WSArgument(pName:String, pType:String = "", isSimpleType:Boolean = false) {
			_name = pName;
			_type = pType;			
			_isSimpleType = isSimpleType;
		}	
		
		public function get name():String {
			return _name;
		}
		
		public function get type():String {
			return _type.split(":")[1];
		}
		
		public function isSimpleType():Boolean {
			return _isSimpleType;
		}
		
		public function isReference():Boolean {
			return _type.split(":")[0] == "tns";
		}
		
		public function isArray():Boolean {
			return isReference() && _type.split(":")[1].indexOf("Array") == 0;
		}		
	}
}
